<?php
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'list';
$return=array();
if($_RQ['op']=='list'){
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$params=array('uniacid'=>$_SESSION['uniacid'],'type'=>5);
    if(!empty($_RQ['name'])){
		$params['name like']='%'.trim($_RQ['name']).'%';
		$return['params']['name']=$_RQ['name'];
	}
	if(!empty($_RQ['mid'])){
		$params['mid']=trim($_RQ['mid']);
		$return['params']['mid']=$_RQ['mid'];
	}
	//$fields=array('id','name','mobile','status','stop','gender','createtime','carid','idcard','bx','address','cid');
    $orderby='createtime desc';
	$total='';
	$return['list']=pdo_getslice('jy_jdk_member_logs',$params,array($pindex,$psize),$total,$fields,'',$orderby);
	foreach($return['list'] as &$v){
		$v['createtime']=date('Y-m-d H:m:s',$v['createtime']);
		}
	$htmls=array(
		'type'=>'list',
		'tabs'=>array(
			array('op'=>'list','title'=>'提现管理'),
		),
		'list'=>array('data'=>'list','edit'=>false,'delete_one'=>false,'deleteall'=>false,'list'=>array(
			array('name'=>'mid','title'=>'会员id','type'=>'string'),
			array('name'=>'nickname','title'=>'会员昵称','type'=>'string'),
			array('name'=>'avatar','title'=>'头像','type'=>'image'),
			array('name'=>'mobile','title'=>'手机号','type'=>'string'),
			array('name'=>'money','title'=>'金额','type'=>'string'),
			array('name'=>'remark','title'=>'备注','type'=>'string'),
			array('name'=>'status','title'=>'状态','type'=>'radio','options'=>'status'),
			
				
		)),
		'search'=>array(
			array('name'=>'mid','width'=>15,'title'=>'会员id','type'=>'string'),
			//array('name'=>'mobile','title'=>'手机号','type'=>'string'),			
		)
	);
	$return['htmls']=$htmls;
	$return['status']=array('1'=>'已审核','0'=>'待审核','2'=>'已驳回');

	exi($return);
	}
if($_RQ['op']=='wait'){
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$params=array('uniacid'=>$_SESSION['uniacid'],'status'=>0,'type'=>5);
    if(!empty($_RQ['name'])){
		$params['name like']='%'.trim($_RQ['name']).'%';
		$return['params']['name']=$_RQ['name'];
	}
	if(!empty($_RQ['mid'])){
		$params['mid']=trim($_RQ['mid']);
		$return['params']['mid']=$_RQ['mid'];
	}
	//$fields=array('id','name','mobile','status','stop','gender','createtime','carid','idcard','bx','address','cid');
    $orderby='createtime desc';
	$total='';
	$return['list']=pdo_getslice('jy_jdk_member_logs',$params,array($pindex,$psize),$total,$fields,'',$orderby);
	foreach($return['list'] as &$v){
		$v['createtime']=date('Y-m-d H:m:s',$v['createtime']);
		}
	$htmls=array(
		'type'=>'list',
		'tabs'=>array(
			array('op'=>'list','title'=>'提现管理'),
		),
		'list'=>array('data'=>'list','edit'=>false,'delete_one'=>false,'deleteall'=>false,'list'=>array(
			array('name'=>'mid','title'=>'会员id','type'=>'string'),
			array('name'=>'nickname','title'=>'会员昵称','type'=>'string'),
			array('name'=>'avatar','title'=>'头像','type'=>'image'),
			array('name'=>'mobile','title'=>'手机号','type'=>'string'),
			array('name'=>'money','title'=>'金额','type'=>'string'),
			array('name'=>'remark','title'=>'备注','type'=>'string'),
			array('name'=>'status','title'=>'状态','type'=>'radio','options'=>'status'),
			
				
		),
		
		),
		'search'=>array(
			array('name'=>'mid','width'=>15,'title'=>'会员id','type'=>'string'),
			//array('name'=>'mobile','title'=>'手机号','type'=>'string'),			
		)
	);
	$return['htmls']=$htmls;
	$return['status']=array('1'=>'已审核','0'=>'待审核','2'=>'已驳回');

	exi($return);
	}
if($_RQ['op']=='shenhe'){
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$params=array('uniacid'=>$_SESSION['uniacid'],'status'=>1,'type'=>5);
    if(!empty($_RQ['name'])){
		$params['name like']='%'.trim($_RQ['name']).'%';
		$return['params']['name']=$_RQ['name'];
	}
	if(!empty($_RQ['mid'])){
		$params['mid']=trim($_RQ['mid']);
		$return['params']['mid']=$_RQ['mid'];
	}
	//$fields=array('id','name','mobile','status','stop','gender','createtime','carid','idcard','bx','address','cid');
    $orderby='createtime desc';
	$total='';
	$return['list']=pdo_getslice('jy_jdk_member_logs',$params,array($pindex,$psize),$total,$fields,'',$orderby);
	foreach($return['list'] as &$v){
		$v['createtime']=date('Y-m-d H:m:s',$v['createtime']);
		}
	$htmls=array(
		'type'=>'list',
		'tabs'=>array(
			array('op'=>'list','title'=>'提现管理'),
		),
		'list'=>array('data'=>'list','edit'=>false,'delete_one'=>false,'deleteall'=>false,'list'=>array(
			array('name'=>'mid','title'=>'会员id','type'=>'string'),
			array('name'=>'nickname','title'=>'会员昵称','type'=>'string'),
			array('name'=>'avatar','title'=>'头像','type'=>'image'),
			array('name'=>'mobile','title'=>'手机号','type'=>'string'),
			array('name'=>'money','title'=>'金额','type'=>'string'),
			array('name'=>'remark','title'=>'备注','type'=>'string'),
			array('name'=>'status','title'=>'状态','type'=>'radio','options'=>'status'),
			
				
		),
		'action'=>array(	
			array('type'=>'href','op'=>'yes','title'=>'通过'),
			array('type'=>'href','op'=>'no','title'=>'驳回'),
		),
		),
		'search'=>array(
			array('name'=>'mid','width'=>15,'title'=>'会员id','type'=>'string'),
			//array('name'=>'mobile','title'=>'手机号','type'=>'string'),			
		)
	);
	$return['htmls']=$htmls;
	$return['status']=array('1'=>'已审核','0'=>'待审核','2'=>'已驳回');

	exi($return);
	}
if($_RQ['op']=='jujue'){
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$params=array('uniacid'=>$_SESSION['uniacid'],'status'=>2,'type'=>5);
    if(!empty($_RQ['name'])){
		$params['name like']='%'.trim($_RQ['name']).'%';
		$return['params']['name']=$_RQ['name'];
	}
	if(!empty($_RQ['mid'])){
		$params['mid']=trim($_RQ['mid']);
		$return['params']['mid']=$_RQ['mid'];
	}
	//$fields=array('id','name','mobile','status','stop','gender','createtime','carid','idcard','bx','address','cid');
    $orderby='createtime desc';
	$total='';
	$return['list']=pdo_getslice('jy_jdk_member_logs',$params,array($pindex,$psize),$total,$fields,'',$orderby);
	foreach($return['list'] as &$v){
		$v['createtime']=date('Y-m-d H:m:s',$v['createtime']);
		}
	$htmls=array(
		'type'=>'list',
		'tabs'=>array(
			array('op'=>'list','title'=>'提现管理'),
		),
		'list'=>array('data'=>'list','edit'=>false,'delete_one'=>false,'deleteall'=>false,'list'=>array(
			array('name'=>'mid','title'=>'会员id','type'=>'string'),
			array('name'=>'nickname','title'=>'会员昵称','type'=>'string'),
			array('name'=>'avatar','title'=>'头像','type'=>'image'),
			array('name'=>'mobile','title'=>'手机号','type'=>'string'),
			array('name'=>'money','title'=>'金额','type'=>'string'),
			array('name'=>'remark','title'=>'备注','type'=>'string'),
			array('name'=>'status','title'=>'状态','type'=>'radio','options'=>'status'),
			
				
		)),
		'search'=>array(
			array('name'=>'mid','width'=>15,'title'=>'会员id','type'=>'string'),
			//array('name'=>'mobile','title'=>'手机号','type'=>'string'),			
		)
	);
	$return['htmls']=$htmls;
	$return['status']=array('1'=>'已审核','0'=>'待审核','2'=>'已驳回');

	exi($return);
	}
if($_RQ['op']=='yes'){
		$id=intval($_RQ['id']);
		if($id){
			pdo_update('jy_jdk_member_logs',array('status'=>1),array('id'=>$id));
			exi('已审核','','/list/');
		}else{
			exi('参数错误','','/list/');
		}
}
if($_RQ['op']=='no'){
		$id=intval($_RQ['id']);
		if($id){
			pdo_update('jy_jdk_member_logs',array('status'=>2),array('id'=>$id));
			exi('已驳回','','/list/');
		}else{
			exi('参数错误','','/list/');
		}
}
	

?>